home *** CD-ROM | disk | FTP | other *** search
/ Otherware / Otherware_1_SB_Development.iso / mac / hypercar / mactool / thinkcgu.sit / app ƒ / dfile.h < prev    next >
Encoding:
C/C++ Source or Header  |  1991-02-08  |  956 b   |  41 lines

  1. /*
  2. *    FILE:        dfile.h
  3. *    AUTHOR:        R. Gonzalez
  4. *    CREATED:    January 30, 1991
  5. *
  6. *    Defines database file class for test app.
  7. */
  8.  
  9. # ifndef    dfile_h
  10. # define    dfile_h
  11.  
  12. # include    "class.h"
  13. # define    MAX_DATA    50
  14.  
  15. struct        Test_App;    /* Can't #include yet due to circular def. */
  16.  
  17. /************************************************************************
  18. *    database file
  19. ************************************************************************/
  20. struct    Dfile:Generic_Class
  21. {
  22.     char            *name[MAX_DATA];
  23.     char            *age[MAX_DATA];
  24.     int                num_data;
  25.     char            *filename;
  26.     
  27.     boolean            init(void);
  28.     virtual boolean    open_existing(char*);
  29.     virtual boolean    write_valid(char*);
  30.     virtual boolean    add_record(char*,char*);
  31.     virtual boolean    get_record(int,char*);
  32.     virtual boolean    sort_by_name(void);
  33.     virtual boolean    sort_by_age(void);
  34.     virtual void    show_name(struct Test_App*); /* don't forget 'struct' */
  35.     boolean            destroy(void);
  36. };
  37.  
  38. # include    "testapp.h"    /* OK to #include here */
  39.  
  40. # endif
  41.